import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

Popup{
    id: popup
    width: 720
    height: 473
    closePolicy: Popup.NoAutoClose
    readonly property variant configObject : config.rootObject
    readonly property variant contenObject: {
        "modbus":{
            "host": hostInput.text,
            "port": Number(portInput.text),
            "serverId": Number(serverIdInput.text),
            "timeout": Number(timeoutInput.text)
        },
        "cameras":[camera1Input.text, camera2Input.text, camera3Input.text],
        "firstScreen": Number(firstScreenInput.text),
        "secondScreen": Number(secondScreenInput.text),
        "server": configObject.server,
        "view3dAnimation": configObject.view3dAnimation,
        "encoder":configObject.encoder
    }
    ToolTip{
        id: tooltip
        property color textColor: "#ffffff"
        anchors.centerIn: parent
        font.pixelSize: 22
        font.family: boldFont.name

        background: Rectangle{
            border.width: 1
            border.color:"#0E2F4C"
            color: "#86448fb8"
            radius: 8
        }
        contentItem: Text{
            text: tooltip.text
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignVCenter
            font: tooltip.font
            color: tooltip.textColor
        }
    }

    background: Image{
        id: image
        anchors.fill: parent
        source: "images/popup-background.png"
        fillMode: Image.Stretch
    }
    clip: true
    enter: Transition {
        NumberAnimation {
            property: "width"
            from: 0
            to: 720
            duration: 1000
        }
        NumberAnimation {
            property: "opacity"
            from: 0
            to: 1
            duration: 1000
        }
    }
    exit: Transition {
        NumberAnimation{
            property: "width"
            to: 0
            duration: 1000
        }
        NumberAnimation{
            property: "opacity"
            to: 0
            duration: 1000
        }
    }
    Text {
        id: text1
        x: 20
        y: 20
        color: "#ffffff"
        text: qsTr("系统设置")
        font.pixelSize: 20
        font.family: boldFont.name
    }

    FontLoader{
        id: boldFont
        source:"fonts/SourceHanSansCN-Bold.otf"
    }
    Button {
        id: button
        x: 603
        width: 15
        height: 15
        text: qsTr("")
        anchors.right: parent.right
        anchors.top: parent.top
        anchors.rightMargin: 20
        anchors.topMargin: 31
        background: Item{
            Image{
                source: "images/close.png"
            }
        }
        onClicked: {
            close();
        }
    }

    StackLayout {
        id: stackLayout
        anchors.fill: parent
        currentIndex: 0

        Item {
            id: systemConfigItem           
            Grid {
                id: grid
                y: 88
                anchors.horizontalCenter: parent.horizontalCenter
                columns: 2
                spacing: 10

                Row {
                    id: row
                    spacing: 15

                    Text {
                        id: text2
                        width: 75
                        color: "#cedce6"
                        text: qsTr("IP")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: hostInput
                        width: 160
                        placeholderText: qsTr("127.0.0.1")
                        font.family: boldFont.name
                        font.pixelSize: 14
                        placeholderTextColor: "#823690e9"
                        selectedTextColor: "#f2f2f2"
                        selectionColor: "#b53dc696"
                        color: "#0EF1FA"
                        text: configObject.modbus.host
                        background: Rectangle{
                            color: "#0E2F4C"
                            border.color: hostInput.activeFocus ? "#149bab" : "#104163"
                            border.width: hostInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row1
                    spacing: 15

                    Text {
                        id: text3
                        width: 75
                        color: "#cedce6"
                        text: qsTr("端口")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: portInput
                        width: 160
                        color: "#0ef1fa"
                        text: configObject.modbus.port
                        font.pixelSize: 14
                        placeholderTextColor: "#823690e9"
                        selectedTextColor: "#f2f2f2"
                        selectionColor: "#b53dc696"
                        placeholderText: qsTr("502")
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0E2F4C"
                            border.color: portInput.activeFocus ? "#149bab" : "#104163"
                            border.width: portInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row2
                    spacing: 15
                    Text {
                        id: text4
                        width: 75
                        color: "#cedce6"
                        text: qsTr("站号")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: serverIdInput
                        width: 160
                        color: "#0ef1fa"
                        text: configObject.modbus.serverId
                        font.pixelSize: 14
                        placeholderTextColor: "#823690e9"
                        selectedTextColor: "#f2f2f2"
                        selectionColor: "#b53dc696"
                        placeholderText: qsTr("0")
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0E2F4C"
                            border.color: serverIdInput.activeFocus ? "#149bab" : "#104163"
                            border.width: serverIdInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row3
                    spacing: 15
                    Text {
                        id: text5
                        width: 75
                        color: "#cedce6"
                        text: qsTr("超时时间")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: timeoutInput
                        width: 160
                        color: "#0ef1fa"
                        text: configObject.modbus.timeout
                        font.pixelSize: 14
                        placeholderTextColor: "#823690e9"
                        selectedTextColor: "#f2f2f2"
                        selectionColor: "#b53dc696"
                        placeholderText: qsTr("1000")
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0E2F4C"
                            border.color: timeoutInput.activeFocus ? "#149bab" : "#104163"
                            border.width: timeoutInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row5
                    spacing: 15
                    Text {
                        id: text6
                        width: 75
                        color: "#cedce6"
                        text: qsTr("主屏索引")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: firstScreenInput
                        width: 160
                        color: "#0ef1fa"
                        text: configObject.firstScreen
                        font.pixelSize: 14
                        placeholderTextColor: "#823690e9"
                        selectedTextColor: "#f2f2f2"
                        selectionColor: "#b53dc696"
                        placeholderText: qsTr("0")
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0E2F4C"
                            border.color: firstScreenInput.activeFocus ? "#149bab" : "#104163"
                            border.width: firstScreenInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row6
                    spacing: 15
                    Text {
                        id: text7
                        width: 75
                        color: "#cedce6"
                        text: qsTr("扩展屏索引")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: secondScreenInput
                        width: 160
                        color: "#0ef1fa"
                        text: configObject.secondScreen
                        font.pixelSize: 14
                        placeholderTextColor: "#823690e9"
                        selectedTextColor: "#f2f2f2"
                        selectionColor: "#b53dc696"
                        placeholderText: qsTr("1")
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0E2F4C"
                            border.color: secondScreenInput.activeFocus ? "#149bab" : "#104163"
                            border.width: secondScreenInput.activeFocus ? 1.5 : 1
                        }
                    }
                }
            }

            Row {
                id: row4
                x: 221
                y: 332
                anchors.bottom: parent.bottom
                anchors.bottomMargin: 20
                anchors.horizontalCenter: parent.horizontalCenter

                Button {
                    id: cancel
                    width: 131
                    height: 51
                    text: qsTr("取消")
                    font.family: boldFont.name
                    font.pixelSize: 14
                    background: Image{
                        source: cancel.hovered? "images/config-button-hovered.png":"images/config-button_normal.png"
                    }
                    contentItem: Text{
                        text: cancel.text
                        horizontalAlignment: Text.AlignHCenter
                        verticalAlignment: Text.AlignVCenter
                        color: "#99b5ce"
                        font: cancel.font
                    }
                    onClicked: {
                        close();
                    }
                }

                Button {
                    id: save
                    width: 131
                    height: 51
                    text: qsTr("保存")
                    font.pixelSize: 14
                    font.family: boldFont.name
                    contentItem: Text {
                        color: "#99b5ce"
                        text: save.text
                        horizontalAlignment: Text.AlignHCenter
                        verticalAlignment: Text.AlignVCenter
                        font: save.font
                    }
                    background: Image {
                        source: save.hovered? "images/config-button-hovered.png":"images/config-button_normal.png"
                    }
                    onClicked: {
                        let obj = contenObject;
                        obj.server = configObject.server;
                        if(config.updateConfig(popup.contenObject)){
                            tooltip.textColor = "#ffffff";
                            tooltip.show(qsTr("配置更新完成"), 2000);
                        }
                        else{
                            tooltip.textColor = "#ff0e0e";
                            tooltip.show(qsTr("配置更新失败"), 2000);
                            return;
                        }
                        config.reload();
                    }
                }

                Button {
                    id: cancel4
                    width: 131
                    height: 51
                    text: qsTr("钻机设置")
                    font.pixelSize: 14
                    font.family: boldFont.name
                    contentItem: Text {
                        color: "#99b5ce"
                        text: cancel4.text
                        horizontalAlignment: Text.AlignHCenter
                        verticalAlignment: Text.AlignVCenter
                        font: cancel4.font
                    }
                    background: Image {
                        source: cancel4.hovered? "images/config-button-hovered.png":"images/config-button_normal.png"
                    }
                    onClicked: {
                        stackLayout.currentIndex = 1;
                    }
                }

                Button {
                    id: animationParam
                    width: 131
                    height: 51
                    text: qsTr("动画参数")
                    font.pixelSize: 14
                    font.family: boldFont.name
                    contentItem: Text {
                        color: "#99b5ce"
                        text: animationParam.text
                        horizontalAlignment: Text.AlignHCenter
                        verticalAlignment: Text.AlignVCenter
                        font: animationParam.font
                    }
                    onClicked: {
                        stackLayout.currentIndex = 2;
                    }

                    background: Image {
                        source: animationParam.hovered? "images/config-button-hovered.png":"images/config-button_normal.png"
                    }
                }
            }

            Column {
                id: column
                x: 105
                y: 213
                spacing: 15

                Row {
                    id: row38
                    width: 504
                    spacing: 15
                    Text {
                        id: text38
                        width: 75
                        color: "#cedce6"
                        text: qsTr("摄像头1")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: camera1Input
                        width: 400
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: qsTr("rtsp://host:port")
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: camera1Input.activeFocus ? "#149bab" : "#104163"
                            border.width: camera1Input.activeFocus ? 1.5 : 1
                        }
                        text: configObject.cameras[0]
                    }
                }

                Row {
                    id: row39
                    width: 504
                    spacing: 15
                    Text {
                        id: text39
                        width: 75
                        color: "#cedce6"
                        text: qsTr("摄像头2")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: camera2Input
                        width: 400
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: qsTr("rtsp://host:port")
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: camera2Input.activeFocus ? "#149bab" : "#104163"
                            border.width: camera2Input.activeFocus ? 1.5 : 1
                        }
                        text: configObject.cameras[1]
                    }
                }

                Row {
                    id: row40
                    width: 504
                    spacing: 15
                    Text {
                        id: text40
                        width: 75
                        color: "#cedce6"
                        text: qsTr("摄像头3")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: camera3Input
                        width: 400
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: qsTr("rtsp://host:port")
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: camera3Input.activeFocus ? "#149bab" : "#104163"
                            border.width: camera3Input.activeFocus ? 1.5 : 1
                        }
                        text: configObject.cameras[2]
                    }
                }
            }
        }

        Item {
            id: drillingParams
            property variant dirllpara: {
                "ZuanGanKuangSheng": Number(zgksInput.text),
                "ZuanGanKuangJiang": Number(zgkjInput.text),
                "ZhiChengYouGangJia": Number(zcygjInput.text),
                "ZhiChengYouGangSong": Number(zcygsInput.text),
                "ZuanGanShengJiangSuDu": Number(zgsjsdInput.text),
                "ZuanGanQianHouYiSuDu": Number(zgqhysdInput.text),
                "ZuanGanZuoYi": Number(zgzyInput.text),
                "ZuanGanYouYi": Number(zgyyInput.text),
                "ZhuaShouJia": Number(zsjInput.text),
                "ZhuaShouSong": Number(zssInput.text),
                "QianHouXuanJianSu": Number(qhxjsInput.text),
                "QianHouXuanJianSuBuChang": Number(qhxjsbcInput.text),
                "ZhengFuXuanJianSu": Number(zfxjsInput.text),
                "ZhengFuXuanJianSuBuChang": Number(zfxjsbcInput.text),
                "JieKouTuiJinBuChang": Number(jktjbcInput.text),
                "JieKouZhuanSu": Number(jkzsInput.text),
                "JieKouZhuanSuBuChang": Number(jkzsbcInput.text),
                "XieKouZhuanSu": Number(xkzsInput.text),
                "XieKouZhuanSuBuChang": Number(xkzsbcInput.text),
                "XieKouQiBaSuDu": Number(xkqbsdInput.text),
                "XieKouQiBaBuChang": Number(xkqbbcInput.text),
                "KongZaiTuiJinSuDu": Number(kztjsdInput.text),
                "KongZaiZhengZhuan": Number(kzzzInput.text),
                "KongZaiQiBaSuDu": Number(kzqbsdInput.text),
                "KongZaiFanZhuan": Number(kzfzInput.text),
                "XieZuanQiBaSuDu": Number(xzqbsdInput.text),
                "XieZuanZhuanSu": Number(xzzsInput.text),
                "ZiDongWenDu": Number(zdwdInput.text),
                "BaoJingWenDu": Number(bjwdInput.text),
                "YouWeiDi": Number(ywdInput.text),
                "KaZhiShangXianChaZhi": Number(kzMaxInput.text),
                "KaZhiXiaXianChaZhi": Number(kzMinInput.text),
                "KaZhiQingChuJiShi": Number(kzTimeoutInput.text)
            }

            Grid {
                id: grid1
                x: 92
                y: 70
                rowSpacing: 5
                columnSpacing: 11

                Row {
                    id: row7
                    height: 25
                    spacing: 15
                    Text {
                        id: text8
                        width: 90
                        color: "#cedce6"
                        text: qsTr("钻杆框升超时")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zgksInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zgksInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zgksInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row8
                    height: 25
                    spacing: 15
                    Text {
                        id: text9
                        width: 90
                        color: "#cedce6"
                        text: qsTr("钻杆框降超时")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zgkjInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zgkjInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zgkjInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row9
                    height: 25
                    spacing: 15
                    Text {
                        id: text10
                        width: 90
                        color: "#cedce6"
                        text: qsTr("支撑夹时间")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zcygjInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zcygjInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zcygjInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row10
                    height: 25
                    spacing: 15
                    Text {
                        id: text11
                        width: 90
                        color: "#cedce6"
                        text: qsTr("支撑松时间")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zcygsInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zcygsInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zcygsInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row11
                    height: 25
                    spacing: 15
                    Text {
                        id: text12
                        width: 90
                        color: "#cedce6"
                        text: qsTr("托钻升降速度")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zgsjsdInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zgsjsdInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zgsjsdInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row12
                    height: 25
                    spacing: 15
                    Text {
                        id: text13
                        width: 90
                        color: "#cedce6"
                        text: qsTr("托钻前后速度")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zgqhysdInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zgqhysdInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zgqhysdInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row13
                    height: 25
                    spacing: 15
                    Text {
                        id: text14
                        width: 90
                        color: "#cedce6"
                        text: qsTr("钻杆左移超时")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zgzyInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zgzyInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zgzyInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row14
                    height: 25
                    spacing: 15
                    Text {
                        id: text15
                        width: 90
                        color: "#cedce6"
                        text: qsTr("钻杆右移超时")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zgyyInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zgyyInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zgyyInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row15
                    height: 25
                    spacing: 15
                    Text {
                        id: text16
                        width: 90
                        color: "#cedce6"
                        text: qsTr("抓手夹压力")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zsjInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zsjInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zsjInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row16
                    height: 25
                    spacing: 15
                    Text {
                        id: text17
                        width: 90
                        color: "#cedce6"
                        text: qsTr("抓手松压力")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zssInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zssInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zssInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row17
                    height: 25
                    spacing: 15
                    Text {
                        id: text18
                        width: 90
                        color: "#cedce6"
                        text: qsTr("抓手前后减速")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: qhxjsInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: qhxjsInput.activeFocus ? "#149bab" : "#104163"
                            border.width: qhxjsInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row18
                    height: 25
                    spacing: 15
                    Text {
                        id: text19
                        width: 90
                        color: "#cedce6"
                        text: qsTr("抓手前后温补")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: qhxjsbcInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: qhxjsbcInput.activeFocus ? "#149bab" : "#104163"
                            border.width: qhxjsbcInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row19
                    height: 25
                    spacing: 15
                    Text {
                        id: text20
                        width: 90
                        color: "#cedce6"
                        text: qsTr("抓手正负减速")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zfxjsInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zfxjsInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zfxjsInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row20
                    height: 25
                    spacing: 15
                    Text {
                        id: text21
                        width: 90
                        color: "#cedce6"
                        text: qsTr("抓手正负温补")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zfxjsbcInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zfxjsbcInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zfxjsbcInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row21
                    height: 25
                    spacing: 15
                    Text {
                        id: text22
                        width: 90
                        color: "#cedce6"
                        text: qsTr("接扣推进温补")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: jktjbcInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: jktjbcInput.activeFocus ? "#149bab" : "#104163"
                            border.width: jktjbcInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row22
                    height: 25
                    spacing: 15
                    Text {
                        id: text23
                        width: 90
                        color: "#cedce6"
                        text: qsTr("接扣转速")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: jkzsInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: jkzsInput.activeFocus ? "#149bab" : "#104163"
                            border.width: jkzsInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row23
                    height: 25
                    spacing: 15
                    Text {
                        id: text24
                        width: 90
                        color: "#cedce6"
                        text: qsTr("接扣转速温补")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: jkzsbcInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: jkzsbcInput.activeFocus ? "#149bab" : "#104163"
                            border.width: jkzsbcInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row24
                    height: 25
                    spacing: 15
                    Text {
                        id: text25
                        width: 90
                        color: "#cedce6"
                        text: qsTr("卸扣转速")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: xkzsInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: xkzsInput.activeFocus ? "#149bab" : "#104163"
                            border.width: xkzsInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row25
                    height: 25
                    spacing: 15
                    Text {
                        id: text26
                        width: 90
                        color: "#cedce6"
                        text: qsTr("卸扣转速温补")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: xkzsbcInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: xkzsbcInput.activeFocus ? "#149bab" : "#104163"
                            border.width: xkzsbcInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row26
                    height: 25
                    spacing: 15
                    Text {
                        id: text27
                        width: 90
                        color: "#cedce6"
                        text: qsTr("卸扣起拔速度")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: xkqbsdInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: xkqbsdInput.activeFocus ? "#149bab" : "#104163"
                            border.width: xkqbsdInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row27
                    height: 25
                    spacing: 15
                    Text {
                        id: text28
                        width: 90
                        color: "#cedce6"
                        text: qsTr("卸扣起拔温补")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: xkqbbcInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: xkqbbcInput.activeFocus ? "#149bab" : "#104163"
                            border.width: xkqbbcInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row28
                    height: 25
                    spacing: 15
                    Text {
                        id: text29
                        width: 90
                        color: "#cedce6"
                        text: qsTr("空载推进速度")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: kztjsdInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: kztjsdInput.activeFocus ? "#149bab" : "#104163"
                            border.width: kztjsdInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row29
                    height: 25
                    spacing: 15
                    Text {
                        id: text30
                        width: 90
                        color: "#cedce6"
                        text: qsTr("空载正转速度")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: kzzzInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: kzzzInput.activeFocus ? "#149bab" : "#104163"
                            border.width: kzzzInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row30
                    height: 25
                    spacing: 15
                    Text {
                        id: text31
                        width: 90
                        color: "#cedce6"
                        text: qsTr("空载起拔速度")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: kzqbsdInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: kzqbsdInput.activeFocus ? "#149bab" : "#104163"
                            border.width: kzqbsdInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row31
                    height: 25
                    spacing: 15
                    Text {
                        id: text32
                        width: 90
                        color: "#cedce6"
                        text: qsTr("空载反转速度")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: kzfzInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: kzfzInput.activeFocus ? "#149bab" : "#104163"
                            border.width: kzfzInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row32
                    height: 25
                    spacing: 15
                    Text {
                        id: text33
                        width: 90
                        color: "#cedce6"
                        text: qsTr("卸钻起拔速度")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: xzqbsdInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: xzqbsdInput.activeFocus ? "#149bab" : "#104163"
                            border.width: xzqbsdInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row33
                    height: 25
                    spacing: 15
                    Text {
                        id: text34
                        width: 90
                        color: "#cedce6"
                        text: qsTr("卸钻转速")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: xzzsInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: xzzsInput.activeFocus ? "#149bab" : "#104163"
                            border.width: xzzsInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row34
                    height: 25
                    spacing: 15
                    Text {
                        id: text35
                        width: 90
                        color: "#cedce6"
                        text: qsTr("自动低温限")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: zdwdInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: zdwdInput.activeFocus ? "#149bab" : "#104163"
                            border.width: zdwdInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row35
                    height: 25
                    spacing: 15
                    Text {
                        id: text36
                        width: 90
                        color: "#cedce6"
                        text: qsTr("自动高温限")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: bjwdInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: bjwdInput.activeFocus ? "#149bab" : "#104163"
                            border.width: bjwdInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row36
                    height: 25
                    spacing: 15
                    Text {
                        id: text37
                        width: 90
                        color: "#cedce6"
                        text: qsTr("油位过低停机")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: ywdInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        placeholderText: "1"
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: ywdInput.activeFocus ? "#149bab" : "#104163"
                            border.width: ywdInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row52
                    height: 25
                    spacing: 15
                    Text {
                        id: text51
                        width: 90
                        color: "#cedce6"
                        text: qsTr("卡滞上限差值")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: kzMaxInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "2 Mpa"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: kzMaxInput.activeFocus ? "#149bab" : "#104163"
                            border.width: kzMaxInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row53
                    height: 25
                    spacing: 15
                    Text {
                        id: text52
                        width: 90
                        color: "#cedce6"
                        text: qsTr("卡滞下限差值")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: kzMinInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "2 Mpa"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: kzMinInput.activeFocus ? "#149bab" : "#104163"
                            border.width: kzMinInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row56
                    height: 25
                    spacing: 15
                    Text {
                        id: text55
                        width: 90
                        color: "#cedce6"
                        text: qsTr("卡滞清除计时")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: kzTimeoutInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "2 S"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: kzTimeoutInput.activeFocus ? "#149bab" : "#104163"
                            border.width: kzTimeoutInput.activeFocus ? 1.5 : 1
                        }
                    }
                }
                columns: 3
                anchors.horizontalCenter: parent.horizontalCenter
            }

            Row {
                id: row37
                x: 163
                y: 409

                Button {
                    id: cancel1
                    width: 131
                    height: 51
                    text: qsTr("加载参数")
                    font.pixelSize: 14
                    font.family: boldFont.name
                    contentItem: Text {
                        color: "#99b5ce"
                        text: "返回上页"
                        horizontalAlignment: Text.AlignHCenter
                        verticalAlignment: Text.AlignVCenter
                        font: cancel1.font
                    }
                    background: Image {
                        source: cancel1.hovered? "images/config-button-hovered.png":"images/config-button_normal.png"
                    }
                    onClicked: {
                        stackLayout.currentIndex = 0;
                    }
                }

                Button {
                    id: loadParams
                    width: 131
                    height: 51
                    text: qsTr("加载参数")
                    font.pixelSize: 14
                    font.family: boldFont.name
                    contentItem: Text {
                        color: "#99b5ce"
                        text: loadParams.text
                        horizontalAlignment: Text.AlignHCenter
                        verticalAlignment: Text.AlignVCenter
                        font: loadParams.font
                    }
                    background: Image {
                        source: loadParams.hovered? "images/config-button-hovered.png":"images/config-button_normal.png"
                    }
                    onClicked: {
                        let obj = interaction.requestParams(contenObject.modbus.host, 21);
                        zgksInput.text = obj.ZuanGanKuangSheng;
                        zgkjInput.text = obj.ZuanGanKuangJiang;
                        zcygjInput.text = obj.ZhiChengYouGangJia;
                        zcygsInput.text = obj.ZhiChengYouGangSong;
                        zgsjsdInput.text = obj.ZuanGanShengJiangSuDu;
                        zgqhysdInput.text =obj.ZuanGanQianHouYiSuDu;
                        zgzyInput.text = obj.ZuanGanZuoYi;
                        zgyyInput.text = obj.ZuanGanYouYi;
                        zsjInput.text = obj.ZhuaShouJia;
                        zssInput.text = obj.ZhuaShouSong;
                        qhxjsInput.text = obj.QianHouXuanJianSu;
                        qhxjsbcInput.text = obj.QianHouXuanJianSuBuChang;
                        zfxjsInput.text = obj.ZhengFuXuanJianSu;
                        zfxjsbcInput.text = obj.ZhengFuXuanJianSuBuChang;
                        jktjbcInput.text = obj.JieKouTuiJinBuChang;
                        jkzsInput.text = obj.JieKouZhuanSu;
                        jkzsbcInput.text = obj.JieKouZhuanSuBuChang;
                        xkzsInput.text = obj.XieKouZhuanSu;
                        xkzsbcInput.text = obj.XieKouZhuanSuBuChang;
                        xkqbsdInput.text = obj.XieKouQiBaSuDu;
                        xkqbbcInput.text = obj.XieKouQiBaBuChang;
                        kztjsdInput.text = obj.KongZaiTuiJinSuDu;
                        kzzzInput.text = obj.KongZaiZhengZhuan;
                        kzqbsdInput.text = obj.KongZaiQiBaSuDu;
                        kzfzInput.text = obj.KongZaiFanZhuan;
                        xzqbsdInput.text = obj.XieZuanQiBaSuDu;
                        xzzsInput.text = obj.XieZuanZhuanSu;
                        zdwdInput.text = obj.ZiDongWenDu;
                        bjwdInput.text = obj.BaoJingWenDu;
                        ywdInput.text = obj.YouWeiDi;
                        kzMaxInput.text = obj.KaZhiShangXianChaZhi;
                        kzMinInput.text = obj.KaZhiXiaXianChaZhi;
                        kzTimeoutInput.text = obj.KaZhiQingChuJiShi;
                    }
                }

                Button {
                    id: emitParams
                    width: 131
                    height: 51
                    text: qsTr("下发参数")
                    font.pixelSize: 14
                    font.family: boldFont.name
                    contentItem: Text {
                        color: "#99b5ce"
                        text: emitParams.text
                        horizontalAlignment: Text.AlignHCenter
                        verticalAlignment: Text.AlignVCenter
                        font: emitParams.font
                    }
                    background: Image {
                        source: emitParams.hovered? "images/config-button-hovered.png":"images/config-button_normal.png"
                    }
                    onClicked: {
                        interaction.emitParams(drillingParams.dirllpara, contenObject.modbus.host, 21);
                    }
                }
            }
        }

        Item {
            id: view3dConfig
            width: 200
            height: 200

            Grid {
                id: grid2
                x: 77
                anchors.verticalCenter: parent.verticalCenter
                rowSpacing: 11

                columnSpacing: 20
                Row {
                    id: row41
                    height: 25
                    spacing: 15
                    Text {
                        id: text41
                        width: 108
                        color: "#cedce6"
                        text: qsTr("托钻杆升降2")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: m5Speed
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.m5Speed
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: m5Speed.activeFocus ? "#149bab" : "#104163"
                            border.width: m5Speed.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row42
                    height: 25
                    spacing: 15
                    Text {
                        id: text42
                        width: 108
                        color: "#cedce6"
                        text: qsTr("钻杆托盘平移")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: m6Speed
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.m6Speed
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: m6Speed.activeFocus ? "#149bab" : "#104163"
                            border.width: m6Speed.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row43
                    height: 25
                    spacing: 15
                    Text {
                        id: text43
                        width: 108
                        color: "#cedce6"
                        text: qsTr("抓手前后旋转")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: m4RotSpeed
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.m4RotSpeed
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "60"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: m4RotSpeed.activeFocus ? "#149bab" : "#104163"
                            border.width: m4RotSpeed.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row44
                    height: 25
                    spacing: 15
                    Text {
                        id: text44
                        width: 108
                        color: "#cedce6"
                        text: qsTr("抓手伸展")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: m7Speed
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.m7Speed
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: m7Speed.activeFocus ? "#149bab" : "#104163"
                            border.width: m7Speed.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row45
                    height: 25
                    spacing: 15
                    Text {
                        id: text45
                        width: 108
                        color: "#cedce6"
                        text: qsTr("钻架升降")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: m2Speed
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.m2Speed
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: m2Speed.activeFocus ? "#149bab" : "#104163"
                            border.width: m2Speed.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row46
                    height: 25
                    visible: false
                    spacing: 15
                    Text {
                        id: text46
                        width: 90
                        color: "#cedce6"
                        text: qsTr("抓手正负旋转")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: m3RotSpeed
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.m3RotSpeed
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "60"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: m3RotSpeed.activeFocus ? "#149bab" : "#104163"
                            border.width: m3RotSpeed.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row47
                    height: 25
                    visible: false
                    spacing: 15
                    Text {
                        id: text47
                        width: 90
                        color: "#cedce6"
                        text: qsTr("推进座平移")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: m11Speed
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.m11Speed
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: m11Speed.activeFocus ? "#149bab" : "#104163"
                            border.width: m11Speed.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row48
                    height: 25
                    visible: false
                    spacing: 15
                    Text {
                        id: text48
                        width: 90
                        color: "#cedce6"
                        text: qsTr("推进架旋转")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: m1RotSpeed
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.m1RotSpeed
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: m1RotSpeed.activeFocus ? "#149bab" : "#104163"
                            border.width: m1RotSpeed.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row49
                    height: 25
                    spacing: 15
                    Text {
                        id: text49
                        width: 108
                        color: "#cedce6"
                        text: qsTr("支撑伸缩")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: m13Speed
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.m13Speed
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: m13Speed.activeFocus ? "#149bab" : "#104163"
                            border.width: m13Speed.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row54
                    height: 25
                    spacing: 15
                    Text {
                        id: text53
                        width: 108
                        color: "#cedce6"
                        text: qsTr("机架-min°")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: enc2MinInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.enc2Min
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: enc2MinInput.activeFocus ? "#149bab" : "#104163"
                            border.width: enc2MinInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row55
                    height: 25
                    spacing: 15
                    Text {
                        id: text54
                        width: 108
                        color: "#cedce6"
                        text: qsTr("机架-max°")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: enc2MaxInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.enc2Max
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: enc2MaxInput.activeFocus ? "#149bab" : "#104163"
                            border.width: enc2MaxInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row57
                    height: 25
                    spacing: 15
                    Text {
                        id: text56
                        width: 108
                        color: "#cedce6"
                        text: qsTr("支撑油缸夹松")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: m1413Input
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.m1413Speed
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: m1413Input.activeFocus ? "#149bab" : "#104163"
                            border.width: m1413Input.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row58
                    height: 25
                    spacing: 15
                    Text {
                        id: text57
                        width: 108
                        color: "#cedce6"
                        text: qsTr("钻杆框升降")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: m12SpeedInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.m1413Speed
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: m12SpeedInput.activeFocus ? "#149bab" : "#104163"
                            border.width: m12SpeedInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row59
                    width: 181
                    height: 25
                    spacing: 15
                    Text {
                        id: text58
                        width: 108
                        color: "#cedce6"
                        text: qsTr("抓手正负旋-min°")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: enc3MinInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.enc3Min
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: enc3MinInput.activeFocus ? "#149bab" : "#104163"
                            border.width: enc3MinInput.activeFocus ? 1.5 : 1
                        }
                    }
                }

                Row {
                    id: row60
                    width: 181
                    height: 25
                    spacing: 15
                    Text {
                        id: text59
                        width: 108
                        color: "#cedce6"
                        text: qsTr("抓手正负旋-max°")
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignTop
                        font.family: boldFont.name
                    }

                    TextField {
                        id: enc3MaxInput
                        width: 76
                        height: 25
                        color: "#0ef1fa"
                        text: config.enc3Max
                        font.pixelSize: 14
                        selectionColor: "#b53dc696"
                        selectedTextColor: "#f2f2f2"
                        placeholderTextColor: "#823690e9"
                        placeholderText: "100"
                        font.family: boldFont.name
                        background: Rectangle {
                            color: "#0e2f4c"
                            border.color: enc3MaxInput.activeFocus ? "#149bab" : "#104163"
                            border.width: enc3MaxInput.activeFocus ? 1.5 : 1
                        }
                    }
                }
                columns: 2
                anchors.horizontalCenter: parent.horizontalCenter
            }

            Row {
                id: row51
                y: 364
                anchors.horizontalCenter: parent.horizontalCenter
                Button {
                    id: cancel2
                    width: 131
                    height: 51
                    text: qsTr("加载参数")
                    font.pixelSize: 14
                    onClicked: {
                        stackLayout.currentIndex = 0;
                    }
                    font.family: boldFont.name
                    contentItem: Text {
                        color: "#99b5ce"
                        text: "返回上页"
                        horizontalAlignment: Text.AlignHCenter
                        verticalAlignment: Text.AlignVCenter
                        font: cancel2.font
                    }
                    background: Image {
                        source: cancel2.hovered? "images/config-button-hovered.png":"images/config-button_normal.png"
                    }
                }

                Button {
                    id: loadParams1
                    width: 131
                    height: 51
                    text: qsTr("保存")
                    font.pixelSize: 14
                    onClicked: {
                        config.m5Speed = Number(m5Speed.text);
                        config.m6Speed = Number(m6Speed.text);
                        config.m4RotSpeed = Number(m4RotSpeed.text);
                        config.m7Speed = Number(m7Speed.text);
                        config.m2Speed = Number(m2Speed.text);
                        config.m3RotSpeed = Number(m3RotSpeed.text);
                        config.m11Speed = Number(m11Speed.text);
                        config.m1RotSpeed = Number(m1RotSpeed.text);
                        config.m13Speed = Number(m13Speed.text);
                        config.enc2Min = Number(enc2MinInput.text);
                        config.enc2Max = Number(enc2MaxInput.text);
                        config.m1413Speed = Number(m1413Input.text);
                        config.m12Speed = Number(m12SpeedInput.text);
                        config.enc3Min = Number(enc3MinInput.text);
                        config.enc3Max = Number(enc3MaxInput.text);
                        config.updateConfig(config.rootObject);
                        config.reload();
                    }
                    font.family: boldFont.name
                    contentItem: Text {
                        color: "#99b5ce"
                        text: loadParams1.text
                        horizontalAlignment: Text.AlignHCenter
                        verticalAlignment: Text.AlignVCenter
                        font: loadParams1.font
                    }
                    background: Image {
                        source: loadParams1.hovered? "images/config-button-hovered.png":"images/config-button_normal.png"
                    }
                }
            }
        }
    }
}
